contactForm Plugin class
This class creates an contact form with a simple captcha check.
Note: The contact form is surrounded by an '<div class="contactForm">' tag to help to style the contact form.
string | $currentUrl | The current URL. Or the url where the form should be send to. If empty, it will use the current URL. |
bool | $xHtml | TRUE when the pages content should be handled as XHTML |
string | $langFile | The languageFile for the texts of the contact form |
string | $recipient | The receiver email adress of the form |
string | $websiteTitle | The title of the website from where the contact form is send |
string | $websiteUrl | The URL of the website from where the contact form is send |
array | $config | Contains all settings for the contactForm |
string | $mandatoryStar | The string which will be used after a field, to mark the field as mandatory |
string | $mandatoryColor | The string which will be add to a mandatory field, when its not filled |
void | __construct() | The constructor of the class, sets the recipient of the form |
string | sendForm() | Sends the form an returns a message if everything was send succesfully or return an error message. |
string | createForm() | Creates the form ready to display in an HTML-page. |
string | showContactForm() | Shows the form, ready to display in an HTML-page. Also the contactForm::sendForm() method will be called if the... |
The current URL. Or the url where the form should be send to. If empty, it will use the current URL.
It will also add the current session to the url.
TRUE when the pages content should be handled as XHTML
In XHTML standalone tags end with " />" instead of ">".
Therefor when a page content is displayed and this property is FALSE all " />" will be changed to ">".
The languageFile for the texts of the contact form
The receiver email adress of the form
The title of the website from where the contact form is send
The URL of the website from where the contact form is send
The string which will be used after a field, to mark the field as mandatory
string | $recipient |
the email of the recipient of the form |
Type constructor
The constructor of the class, sets the recipient of the form
string sendForm ( |
[ &$mandatoryfieldsOk = true], [ &$mandatoryFields = array()], bool $mandatoryfieldsOk, array $mandatoryFields) |
bool | $mandatoryfieldsOk |
tells if the mandatory fields are not empty (this variable will be also changed outside of this method) Default true |
array | $mandatoryFields |
stores the mandatory field which are empty (this variable will be also changed outside of this method) Default array() |
&$mandatoryfieldsOk |
| |
&$mandatoryFields |
|
Name sendForm()
Sends the form an returns a message if everything was send succesfully or return an error message.
array | $mandatoryFields |
stores the mandatory field which are empty (this variable will be also changed outside of this method) Default array() |
Name createForm()
Creates the form ready to display in an HTML-page.
string | $folder |
the absolute path of an folder to read |
Name showContactForm()
Shows the form, ready to display in an HTML-page. Also the contactForm::sendForm() method will be called if the form is send.
Note: The contact form is surrounded by an '<div class="contactForm">' tag to help to style the contact form.